export function userGroupColumns() {
    return [
        {
            title: this.$t('module.userManage.userGroupId'),
            key: 'id'
        },
        {
            title: this.$t('module.userManage.userGroupName'),
            key: 'name'
        },
        {
            title: this.$t('common.operating'),
            fixed: 'right',
            align: 'center',
            render: (h, params) => {
                return h(
                    'RowTools',
                    {
                        props: {
                            data: [
                                {
                                    type: 'icon',
                                    icon: 'md-create',
                                    text: this.$t('common.edit'),
                                    handle: () => this.addOrEditUser(params.row)
                                },
                                {
                                    type: 'icon',
                                    icon: 'md-people',
                                    text: this.$t('module.userManage.userGroupAssign'),
                                    handle: () => this.AssignPeople(params.row)
                                },
                                {
                                    type: 'icon',
                                    icon: 'ios-trash',
                                    text: this.$t('common.delete'),
                                    handle: () => this.deleteUser(params.row)
                                }
                            ]
                        }
                    }
                )
            }
        }
    ]
}

export function assignUserColumns() {
    return [
        {
            type: 'selection',
            width: 40
        },
        {
            title: this.$t('module.userManage.name'),
            key: 'userName'
        },
        {
            title: this.$t('module.userManage.phone'),
            key: 'mobile'
        },
        {
            title: this.$t('module.userManage.mail'),
            key: 'email'
        }
    ]
}

export function userColumns() {
    return [
        {
            type: 'selection',
            width: 40
        },
        {
            title: this.$t('module.userManage.name'),
            key: 'first'
        },
        {
            title: this.$t('module.userManage.phone'),
            key: 'phone'
        },
        {
            title: this.$t('module.userManage.mail'),
            key: 'email'
        }
    ]
}